import nose
from nose.plugins.multiprocess import MultiProcess
import testconfig
from testconfig import TestConfig, config
from nose.plugins.capture import Capture
import sys
from nose.plugins.xunit import Xunit
from ConfigParser import SafeConfigParser



if __name__ == '__main__':
   
    configFile = sys.argv[1]   
    parser = SafeConfigParser()
    
    parser.read(configFile)
    xunitFile = parser.get('TEST_CONFIG','xunitFile')
    #config['TEST_CONFIG']['browserName']

    nose.run(argv=['nosetests','-v','-s','--with-xunit','--xunit-file=.\\test-reports\\'+xunitFile,'--tc-file',configFile,'smoke_tests'], 
             plugins=[TestConfig(),Capture(),Xunit()])

#    nose.run(argv=['nosetests','-v','-s','--with-xunit','--xunit-file=.\\test-reports\\'+xunitFile,'--tc-file',configFile,'TESTVerifications.py'], 
#             plugins=[TestConfig(),Capture(),Xunit()])
    
    
##smoek tests folder?
    